export default {
  namespaced: true, // 开启命名空间
  state: {
    username: '配成乐',
    age: 18
  },
  getters: {
    pingfang (state) {
      return state.age * state.age
    }
  },
  mutations: {
    updateAge (state, n) {
      state.age += n
    }
  },
  actions: {
    asdasd3s (store, m) {
      setTimeout(() => {
        store.commit('updateAge', m)
      }, 2000)
    }
  }
}
